package com.qt.myio.ConvertStream;

import java.io.Serializable;

/**
 * @Author zsf
 * @Date 2023/9/27 23:06
 * @Version 1.0
 */
public class Student implements Serializable {

    private static final long serialVersionUID = -2738382492003598681L;
    private String name;
    private int age;
    //不需要序列化======注明是瞬态
    private transient int score;


    public Student() {
    }

    public Student( String name, int age, int score) {
        this.name = name;
        this.age = age;
        this.score = score;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return age
     */
    public int getAge() {
        return age;
    }

    /**
     * 设置
     * @param age
     */
    public void setAge(int age) {
        this.age = age;
    }

    /**
     * 获取
     * @return score
     */
    public int getScore() {
        return score;
    }

    /**
     * 设置
     * @param score
     */
    public void setScore(int score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "name = " + name + ", age = " + age + ", score = " + score + "}";
    }
}
